<?php
  define('DEBUG_MODE', true);
  error_reporting(DEBUG_MODE ? E_ALL : 0);
  session_start();
  define('ROOT', dirname(__FILE__).'/../..');
  
  $php_self = addslashes(basename(htmlspecialchars($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'])));

  include 'include/function/general.php';
  include '../include/function/database.php';
  include '../content/config.php';
  require 'include/class/message_stack.php';
  require 'include/class/split_page_results.php';
  
  $messageStack = new messageStack;

  if (!is_logined() && $php_self != 'login.php') {
    $_SESSION['loginUrl'] = $_SERVER['REQUEST_URI'];
    redirect('login.php');
  }
